/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hemerasolutions.v2trainer.dao.interfaces;

/**
 *
 * @author ryegros
 */

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.EntityManager;

import org.springframework.context.MessageSource;

import com.hemerasolutions.v2trainer.dao.ExceptionDao;
import com.hemerasolutions.v2trainer.model.screen.Reference;



public interface BaseDaoInterface<T> extends Serializable {

    public Class<T> getObjectClass();

	public T getById(int id);

    public T create(T object) throws ExceptionDao;
    
    public T save(T object) throws ExceptionDao;

    public List<T> create(List<T> objects) throws ExceptionDao;
    
    public List<T> save(List<T> objects) throws ExceptionDao;    
    
    public void delete(T object);

    public T getByName(String name);
    
    public List<T> list();
   
    public void setEntityManager(EntityManager em);

    public EntityManager getEntityManager();
   
    public Date endDayDateHour(Date dt);

	public String localizedText(String id);

	public MessageSource getMessage();

	public void setMessage(MessageSource message);

	public long getSerialversionuid();

	public Date begDayDateHour(Date dt);

	public void detach(T object);

	public boolean hasChanged(T object);

	public List<Reference> getReferences(T object);

}

